home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / A.D. Software / OOFILE 1.3b4d6.sit / OOFILE 1.3b4d6 / OOFGraph 1.0b2 Demo / Application Source / GrTstApp.h < prev    next >
Text File  |  1997-03-23  |  3KB  |  130 lines

  1. #ifndef H_GRTSTAPP
  2. #define H_GRTSTAPP
  3.  
  4. #include "oofile.h"
  5.  
  6.  
  7. // TEST DATABASES
  8.  
  9. DECLARE_CLASS(dbStudent)
  10.     dbChar        Name, Subject;
  11.     dbLong        Mark;
  12.  
  13.     dbStudent() :
  14.                 dbTable("Students"),
  15.                 Name(39, "Name", kIndexCompress),
  16.                 Subject(79, "Subject", kIndexCompress),
  17.                 Mark("Mark", kIndexed)
  18.                 {};
  19.     
  20. // my own data entry procedures
  21.     void Add(const char *name, const char *subject, const long mark);
  22.     void AddTestData();
  23. };
  24.  
  25. DECLARE_CLASS(dbOverlay)
  26.     dbChar        Name;
  27.     dbLong        LastYear;
  28.     
  29.     dbOverlay():
  30.                   dbTable("Overlay"),
  31.                 Name(39, "Name"),
  32.                   LastYear("Last Year")
  33.                   {};
  34.  
  35. // my own data entry procedures
  36.     void Add(const char *name, const long lastyear);
  37.     void AddTestData();
  38. };
  39.  
  40. DECLARE_CLASS(dbStudentOverlay)
  41.     dbChar        Name, Subject;
  42.     dbLong        Mark;
  43.  
  44.     dbStudentOverlay() :
  45.                 dbTable("Students"),
  46.                 Name(39, "Name", kIndexCompress),
  47.                 Subject(79, "Subject", kIndexCompress),
  48.                 Mark("Mark", kIndexed)
  49.                 {};
  50.     
  51. // my own data entry procedures
  52.     void Add(const char *name, const char *subject, const long mark);
  53.     void AddTestData();
  54. };
  55.  
  56.  
  57. DECLARE_CLASS(dbMath)
  58.     dbChar        Name;
  59.     dbReal        Xval,Yval;
  60.  
  61.     dbMath() :
  62.                 dbTable("Some Curves"),
  63.                 Name(39, "Name", kIndexCompress),
  64.                 Xval("X Value", kIndexed),
  65.                 Yval("Y Value", kIndexed)
  66.                 {};
  67.     
  68. // my own data entry procedures
  69.     void Add(const char *name, const double x, const double y);
  70.     void AddTestData();
  71. };
  72.  
  73.  
  74. DECLARE_CLASS(dbTemperature)
  75.     dbChar        Day, Time;
  76.     dbLong        Temp;
  77.  
  78.     dbTemperature() :
  79.                 dbTable("Temperatures"),
  80.                 Day(12, "Day", kIndexCompress),
  81.                 Time(12, "Time", kIndexCompress),
  82.                 Temp("Temperature", kIndexed)
  83.                 {};
  84.     
  85. // my own data entry procedures
  86.     void Add(const char *day, const char *time, const long temp);
  87.     void AddTestData();
  88. };
  89.  
  90.  
  91. DECLARE_CLASS(dbExports)
  92.     dbChar        Year, Port;
  93.     dbReal        Value;
  94.     dbChar        Outcome;
  95.  
  96.     dbExports() :
  97.                 dbTable("Exports"),
  98.                 Year(5, "Year"),
  99.                 Port(20, "Port"),
  100.                 Value("Value ($M)"),
  101.                 Outcome(20, "Outcome")
  102.                 {};
  103.     
  104. // my own data entry procedures
  105.     void Add(const char *year, const char *port, const double value, const char *outcome);
  106.     void AddTestData();
  107. };
  108.  
  109.  
  110. // ===========================================================================
  111. //    GrTstApp.h                    Derived heavily from the Dashboard Starter
  112. // ===========================================================================
  113.  
  114. #include <LApplication.h>
  115.  
  116. class    oofGraphWindow;
  117.  
  118. class    LWindow;
  119. class    GraphTestApp : public LApplication {
  120. public:
  121.     virtual void        Initialize();
  122.     virtual             ~GraphTestApp();
  123.     
  124.     virtual Boolean        ObeyCommand(CommandT inCommand, void *ioParam = nil);
  125.     virtual void        FindCommandStatus(CommandT inCommand,
  126.                             Boolean &outEnabled, Boolean &outUsesMark,
  127.                             Char16 &outMark, Str255 outName);
  128. };
  129. #endif
  130.